#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <list>
using namespace std;

int main() {
    int N;
    scanf("%d", &N);

    bool flag = true;
    int k = 0;
    int g = 0;
    for (int i = 0; i < N; ++i) {
        int tmp;
        scanf("%d", &tmp);

        if (flag)
            k += tmp;
        else
            g += tmp;

        flag = !flag;
    }

    printf("%s", (g > 12 && k <= 12) ? "YES" : "NO");

    return 0;
}
